home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / tcp_ip / tnos / tnos100s / ftpcli.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-13  |  1.8 KB  |  61 lines

  1. /* Mods by G1EMM and PA0GRI */
  2. #ifndef _FTPCLI_H
  3. #define _FTPCLI_H
  4.  
  5. #include <stdio.h>
  6.  
  7. #ifndef _FTP_H
  8. #include "ftp.h"
  9. #endif
  10.  
  11. #ifndef _SESSION_H
  12. #include "session.h"
  13. #endif
  14.  
  15. #ifndef _DIRUTIL_H
  16. #include "dirutil.h"
  17. #endif
  18.  
  19. #define LINELEN 256             /* Length of user command buffer */
  20.  
  21. #ifndef CTLZ
  22. #define CTLZ    26              /* EOF for CP/M systems */
  23. #endif
  24.  
  25. /* Per-session FTP client control block */
  26. struct ftpcli {
  27.     int control;            /* Control socket */
  28.     int data;               /* Data socket */
  29.  
  30.     char state;
  31. #define COMMAND_STATE   0       /* Awaiting user command */
  32. #define SENDING_STATE   1       /* Sending data to user */
  33. #define RECEIVING_STATE 2       /* Storing data from user */
  34.  
  35.     int16 verbose;          /* Transfer verbosity level */
  36. #define V_QUIET         0       /* Error messages only */
  37. #define V_SHORT         1       /* Final message only */
  38. #define V_NORMAL        2       /* display control messages */
  39. #define V_HASH          3       /* control messages, hash marks */
  40. #define V_BYTE          4       /* control messages, byte count */
  41.  
  42.     int batch;              /* Command batching flag */
  43.     int abort;              /* Aborted transfer flag */
  44.     int update;        /* Compare with MD5 during mput/mget */
  45.     char type;              /* Transfer type */
  46.     char typesent;          /* Last type command sent to server */
  47.     int logbsize;           /* Logical byte size for logical type */
  48.     FILE *fp;               /* File descriptor being transferred */
  49.     char line[LINELEN];    /* Last response from server */
  50.  
  51.     int lzw;        /* is lzw being used ? */
  52.     int lzwbits;        /* number of LZW bits selected */
  53.     int lzwmode;        /* lzw mode to use */
  54.     struct session *session;
  55.     char *password;
  56.     struct cur_dirs *curdirs;
  57. };
  58. #define NULLFTP (struct ftpcli *)0
  59.  
  60. #endif  /* _FTPCLI_H */
  61.